package com.itmuch.cloud.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: chenhs
 * @date: Created in 16:46 2020/1/29
 *
 * 手动刷新配置地址：http://localhost:8082/refresh
 *
 **/
@RestController
@RefreshScope
public class ConfigClientController {

    @Value("${profile}")
    private String profile;

    @RequestMapping("/profile")
    public String getProfile() {
        return this.profile;
    }

}
